/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package swym.protocol;

/**
 *
 * @author mschaefer
 */
public class MessageException extends Exception 
{
    protected int requestID;
    protected int errorCode;
    protected String errorMessage;
    
    protected MessageException( int requestID, int errorCode, String errorMessage )
    {
        super( errorMessage );
        
        this.requestID = requestID;
        this.errorCode = errorCode;
    }
    
    public int getRequestID() { return requestID; }
    public int getReturnCode() { return errorCode; }
    
    public String toString()
    {
        return getMessage() + " request ID: " + requestID + " erorrCode: " + errorCode;
    }
}
